<!doctype html>
<html lang="<?php echo lang('header_doc_lang') ?>" class="no-js">
    <head>
        <meta charset="utf-8">

        <title><?php echo $title ?></title>
        <meta name="description" content="">
        <meta name="author" content="">
        <!-- Make sure the latest version of IE is used -->
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

        <!-- Place favicon.ico and apple-touch-icon.png in the root of your domain and delete these references -->
        <link rel="shortcut icon" href="/favicon.ico">
        <link rel="apple-touch-icon" href="/apple-touch-icon.png">

        <!-- CSS - Setup -->
        <?php $this->assets->css('admin/style.css'); ?>
        <!-- CSS - Styles -->
        <?php $this->assets->css('admin/grid.css'); ?>
        <?php $this->assets->css('admin/base.css'); ?>
        <?php $this->assets->css('admin/forms.css'); ?>
        <?php $this->assets->css('admin/lists.css'); ?>
        <?php $this->assets->css('admin/calendar.css'); ?>
        <?php $this->assets->css('admin/extensions.css'); ?>
        <?php $this->assets->css('admin/visualize.css'); ?>
        <?php $this->assets->display('css');?>


        <!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
        <?php $this->assets->js('admin/modernizr.min.js'); ?>
    </head>
    <!--[if IE 7 ]>    <body class="ie7 login"> <![endif]-->

    <!--[if IE 8 ]>    <body class="ie8 login"> <![endif]-->
    <!--[if (gt IE 9)|!(IE)]><!-->
    <body class="login">
        <!--<![endif]-->
        
        <?php 
        echo $contents;
        ?>
                   
            <br class="cl" />
        </div>
        <!-- Javascript at the bottom for fast page loading --> 
        <?php $this->assets->js('http://www.google.com/jsapi'); ?>
        <?php $this->assets->js('admin/jquery-1.4.2.min.js'); ?>
        <?php $this->assets->js('admin/jquery-ui-1.8.1.min.js'); ?>
        <?php $this->assets->js('admin/jquery.tipsy.js'); ?>
        <?php $this->assets->js('admin/jquery.treeview.min.js'); ?>
        <?php $this->assets->js('admin/jquery.cookie.js'); ?>
        <?php $this->assets->js('admin/jquery.lightbox-0.5.min.js'); ?>
        <?php $this->assets->js('admin/jquery.wysiwyg.js'); ?>
        <?php $this->assets->js('admin/functions.js'); ?>
        
        <?php $this->assets->display('js'); ?>
        <!-- Page specific Javascript --> 
        <script type="text/javascript">
    
            // Load the Visualization API and the piechart package.
            google.load('visualization', '1', {'packages':['corechart']});
      
            // Set a callback to run when the Google Visualization API is loaded.
            google.setOnLoadCallback(drawChart);
      

	  
            // Handle viewport resizing
            var previousWidth = $(window).width();
            $(window).resize(function()
            {
                if (previousWidth != $(window).width())
                {
                    drawChart();
                    previousWidth = $(window).width();
                }
            });
						
            // Callback that creates and populates a data table, 
            // instantiates the pie chart, passes in the data and
            // draws it.
            function drawChart() {

                // Create our data table.
                var countries =
                    ['Unique Visits', 'Page Views'];
                var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'];
                var productionByCountry = [[165, 135, 157, 139, 136, 165],
                    [186, 164, 172, 165, 155, 180]];

                // Create and populate the data table.
                var data = new google.visualization.DataTable();
                data.addColumn('string', 'Month');
                for (var i = 0; i < countries.length; ++i) {
                    data.addColumn('number', countries[i]);
                }
                data.addRows(months.length);
                for (var i = 0; i < months.length; ++i) {
                    data.setCell(i, 0, months[i]);
                }
                for (var i = 0; i < countries.length; ++i) {
                    var country = productionByCountry[i];
                    for (var month = 0; month < months.length; ++month) {
                        data.setCell(month, i + 1, country[month]);
                    }
                }

                // Instantiate and draw our chart, passing in some options.
                var div = $('#chart_div');
                var chart = new google.visualization.AreaChart(document.getElementById('chart_div'));
                chart.draw(data, {width: div.width(), height: 350, is3D: true, title: '6 Month Traffic Report', hAxis: {title: "Month"}, vAxis: {title: "Views"}});
            }
  
        </script>
        
        <!--[if lt IE 7 ]>
            <script src="<?php echo theme_url(); ?>admin/js/dd_belatedpng.js"></script>
          <![endif]--> 
    </body>
</html>